<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form" id="formAdd">
                <input type="hidden" name="id" value="${data.id}">
                <#if !data.pid>
                    <input type="hidden" name="pid" value="0">
                <#else>
                    <input type="hidden" name="pid" value="${data.pid}">
                </#if>
                <#if data.pid!='' && data.pid!='0' >
                <div class="layui-form-item">
                    <label class="layui-form-label">父菜单名称</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" lay-verType="tips" readonly
                               name="parentName" value="${data.parentName}">
                    </div>
                </div>
                </#if>
                <div class="layui-form-item">
                    <label class="layui-form-label">菜单名称</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" placeholder="请输入菜单名称"
                               lay-verType="tips" lay-verify="required" name="name" value="${data.name}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">菜单顺序</label>
                    <div class="layui-input-inline" style="width: 120px;">
                        <input type="number" class="layui-input" placeholder="请输入菜单顺序" lay-verType="tips"
                               lay-verify="required" name="seq" value="${data.seq}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">菜单地址</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" placeholder="请输入菜单地址"
                               name="url" value="${data.url}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">菜单视图</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" placeholder="请输入菜单视图"
                               name="view" value="${data.view}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">菜单图标</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" placeholder="请输入菜单图标"
                               name="icon" value="${data.icon}">
                    </div>
                    <div class="layui-form-mid layui-word-aux"><i class="layui-icon ${data.icon}"></i></div>

                </div>

                <input type="hidden" lay-submit=""
                <@shiro.hasPermission name="core/menu/index:add or core/menu/index:update">
                       lay-filter="modifyData"
                </@shiro.hasPermission> id="btnAdd"/>

            </form>
        </div>
    </div>
</div>
<script>
    var fn = {};
    layui.config({
        base: '/static/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'core/menu_modify']);
</script>